package com.sumainfor.pc.market.service;
import com.sumainfor.pc.market.dao.RdTenantAskMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @Date 2018年11月7日
 * @Describe 工程部查询房源配置
 */
@Service
public class RdTenantAskService implements Serializable {

    private ReentrantLock lock = new ReentrantLock(false);

    Logger log = LoggerFactory.getLogger(RdTenantAskService.class);// 日志

    @Autowired
    private RdTenantAskMapper rdTenantAskMapper;

    /**
     * 根据客户编号查询客户的接待记录
     * @param params
     * @return
     */
    public List<Map<String,Object>> getTenantAskListByTenId(Map<String,Object> params){
        List<Map<String,Object>> list=rdTenantAskMapper.getAskTimeByTenId(params);
        for ( Map<String, Object> map :list){
            System.out.println("时间:"+ map.get("AskTime"));
            map.put("TenantList",rdTenantAskMapper.getTenantAskListByTenId(map));
        }
        return list;
    }

}
